home *** CD-ROM | disk | FTP | other *** search
/ X User Tools / X User Tools (O'Reilly and Associates)(1994).ISO / sun4c / archive / tcltk.z / tcltk / man / catn / option.n < prev    next >
Text File  |  1994-09-20  |  4KB  |  133 lines

  1.  
  2.  
  3.  
  4. option(n)                  Tk Commands
  5.  
  6.  
  7.  
  8. _________________________________________________________________
  9.  
  10. NAME
  11.      option - Add/retrieve  window  options  to/from  the  option
  12.      database
  13.  
  14. SYNOPSIS
  15.      option add _p_a_t_t_e_r_n _v_a_l_u_e ?_p_r_i_o_r_i_t_y?
  16.  
  17.      option clear
  18.  
  19.      option get _w_i_n_d_o_w _n_a_m_e _c_l_a_s_s
  20.  
  21.      option readfile _f_i_l_e_N_a_m_e ?_p_r_i_o_r_i_t_y?
  22. _________________________________________________________________
  23.  
  24.  
  25. DESCRIPTION
  26.      The option command allows you  to  add  entries  to  the  Tk
  27.      option  database  or  to retrieve options from the database.
  28.      The add form of the command adds a new option to  the  data-
  29.      base.  _P_a_t_t_e_r_n contains the option being specified, and con-
  30.      sists of names and/or  classes  separated  by  asterisks  or
  31.      dots,  in  the usual X format.  _V_a_l_u_e contains a text string
  32.      to associate with _p_a_t_t_e_r_n;  this is the value that  will  be
  33.      returned  in  calls to Tk_GetOption or by invocations of the
  34.      option get command.  If _p_r_i_o_r_i_t_y is specified, it  indicates
  35.      the  priority  level  for  this  option (see below for legal
  36.      values);  it defaults to interactive.  This  command  always
  37.      returns an empty string.
  38.  
  39.      The  option  clear  command  clears  the  option   database.
  40.      Default  options  (from the RESOURCE_MANAGER property or the
  41.      .Xdefaults file) will be  reloaded  automatically  the  next
  42.      time  an option is added to the database or removed from it.
  43.      This command always returns an empty string.
  44.  
  45.      The option get command  returns  the  value  of  the  option
  46.      specified  for  _w_i_n_d_o_w  under  _n_a_m_e  and  _c_l_a_s_s.  If several
  47.      entries in the  option  database  match  _w_i_n_d_o_w,  _n_a_m_e,  and
  48.      _c_l_a_s_s,  then  the command returns whichever was created with
  49.      highest _p_r_i_o_r_i_t_y  level.   If  there  are  several  matching
  50.      entries  at  the same priority level, then it returns which-
  51.      ever entry was most recently entered into the  option  data-
  52.      base.   If  there  are  no  matching entries, then the empty
  53.      string is returned.
  54.  
  55.      The readfile form  of  the  command  reads  _f_i_l_e_N_a_m_e,  which
  56.      should  have  the standard format for an X resource database
  57.      such as .Xdefaults, and adds all the  options  specified  in
  58.      that file to the option database.  If _p_r_i_o_r_i_t_y is specified,
  59.      it indicates the  priority  level  at  which  to  enter  the
  60.  
  61.  
  62.  
  63. Tk                                                              1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. option(n)                  Tk Commands
  71.  
  72.  
  73.  
  74.      options;  _p_r_i_o_r_i_t_y defaults to interactive.
  75.  
  76.      The _p_r_i_o_r_i_t_y arguments to the option  command  are  normally
  77.      specified symbolically using one of the following values:
  78.  
  79.      widgetDefault
  80.           Level 20.  Used  for  default  values  hard-coded  into
  81.           widgets.
  82.  
  83.      startupFile
  84.           Level 40.  Used for options specified  in  application-
  85.           specific startup files.
  86.  
  87.      userDefault
  88.           Level 60.  Used for options specified in  user-specific
  89.           defaults  files, such as .Xdefaults, resource databases
  90.           loaded into the  X  server,  or  user-specific  startup
  91.           files.
  92.  
  93.      interactive
  94.           Level 80.  Used  for  options  specified  interactively
  95.           after  the  application  starts  running.   If _p_r_i_o_r_i_t_y
  96.           isn't specified, it defaults to this level.
  97.  
  98.      Any of the above keywords may be abbreviated.  In  addition,
  99.      priorities  may  be  specified  numerically  using  integers
  100.      between 0 and 100, inclusive.  The numeric form is  probably
  101.      a  bad  idea  except  for new priority levels other than the
  102.      ones given above.
  103.  
  104.  
  105. KEYWORDS
  106.      database, option, priority, retrieve
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. Tk                                                              2
  130.  
  131.  
  132.  
  133.